import React, { Component } from 'react';
import {Route,Switch, Redirect} from 'react-router-dom'
import login from './component/login/login'
import Admin from "./component/admin/admin";
import Register from "./component/register/register";
import Manager from "./component/manager/manager";

class App extends Component {
  render() {
      return (
          <Switch>
              {/*只匹配一个*/}
              <Redirect exact={true} from='/' to='/login'></Redirect>
              <Route path="/login" component={login}></Route>
              <Route path="/admin" component={Admin}></Route>
              <Route path="/manager" component={Manager}></Route>
              <Route path="/register" component={Register}></Route>
          </Switch>
      )
  }
}
export default App;